﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace The_Last_Knights.GUI
{
    public class Text
    {
        protected string _value;
        protected SpriteFont _fontInfo;

        public Text(Game game, string text, string font)
        {
            _value = text;
            _fontInfo = game.Content.Load<SpriteFont>(GameAssertPath.FONT_PATH + font);            
        } 

        public Vector2 GetBoundary()
        {
            return _fontInfo.MeasureString(_value);
        }
        public void Draw(SpriteBatch sb, Vector2 position, Color color)
        {
            sb.Begin();
            sb.DrawString(_fontInfo, _value, position, color);
            sb.End();
        }    
    }
}
